#!/usr/bin/make -f
# Copyright 2007 Sylvestre Ledru <sylvestre.ledru@inria.fr>

include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

JAVA_HOME            := /usr/lib/jvm/java-gcj
DEB_JARS             := ant-nodeps looks skinlf commons-logging
DEB_ANT_BUILD_TARGET := build.with.native jar doc
BUILDDIR 	     := build
DEB_COMPRESS_EXCLUDE := .sxw

install/libflexdock-java::
	install -m 644 -D $(BUILDDIR)/flexdock-$(DEB_UPSTREAM_VERSION).jar debian/libflexdock-java/usr/share/java/flexdock-$(DEB_UPSTREAM_VERSION).jar
	ln -s flexdock-$(DEB_UPSTREAM_VERSION).jar debian/libflexdock-java/usr/share/java/flexdock.jar

install/libflexdock-java-demo::
	install -m 644 -D $(BUILDDIR)/flexdock-demo-$(DEB_UPSTREAM_VERSION).jar debian/libflexdock-java-demo/usr/share/java/flexdock-demo-$(DEB_UPSTREAM_VERSION).jar
	ln -s flexdock-demo-$(DEB_UPSTREAM_VERSION).jar debian/libflexdock-java-demo/usr/share/java/flexdock-demo.jar

install/libflexdock-jni::
	install -m 644 -D $(BUILDDIR)/bin/org/flexdock/docking/drag/outline/xlib/libRubberBand.so debian/libflexdock-jni/usr/lib/jni/libRubberBand.so.1
	ln -s libRubberBand.so.1 debian/libflexdock-jni/usr/lib/jni/libRubberBand.so

get-orig-source:
	-uscan --upstream-version 0 --rename	
